import request from '@/utils/request'

// 查询实习岗位列表
export function listPost(query) {
  return request({
    url: '/cms/post/list',
    method: 'get',
    params: query
  })
}

// 查询实习岗位详细
export function getPost(id) {
  return request({
    url: '/cms/post/' + id,
    method: 'get'
  })
}

// 新增实习岗位
export function addPost(data) {
  return request({
    url: '/cms/post',
    method: 'post',
    data: data
  })
}

// 修改实习岗位
export function updatePost(data) {
  return request({
    url: '/cms/post',
    method: 'put',
    data: data
  })
}

//修改实习岗位的状态
export function editState(id) {
  return request({
    url: '/cms/post/editState/'+id,
    method: 'post',
    //data: data
  })
}

// 删除实习岗位
export function delPost(id) {
  return request({
    url: '/cms/post/' + id,
    method: 'delete'
  })
}
